package com.bds.wm.model.common;

import com.bds.wm.model.User;

/**
 * Created by guoyu on 2018/1/29.
 */
public class UserSession {
    public final static String sessionKey = "sessionContext";
    public final static String verifyCode = "verifyCode";

    private User user;
    private String user_name;
    private Long user_id;
    private String role;

    public UserSession(User user) {
        this.user = user;
        this.user_name = user.getUsername();
        this.user_id = user.getId();
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public User getUser() {
        return this.user;
    }

    public Long getUser_id() {
        return user_id;
    }

    public void setUser_id(Long user_id) {
        this.user_id = user_id;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

}
